﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Common;
namespace ClientRegister
{
    public partial class RegisterForm : Form
    {
        public RegisterForm()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 获取硬件信息CPU_ID
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnReader_Click(object sender, EventArgs e)
        {
            ReaderInfo();
        }

        public void ReaderInfo()
        {
            StringBuilder sb = new StringBuilder();
            //获取客户端日期
            string cpuID = DataEncrypt.GetCPUID();//获取CPUID
            string nowDate = DateTime.Now.ToString("yyyyMMdd");//精确到天
            sb.Append(nowDate);
            sb.Append(",");
            sb.Append(cpuID);
            string strDes = DataEncrypt.DESEncrypt(sb.ToString());
            this.txtKey.Text = strDes;
        }

        private void btnRegister_Click(object sender, EventArgs e)
        {

        }
    }
}
